/*
 * @Author: kly812 konglingyu812@163.com
 * @Date: 2024-01-15 09:55:49
 * @LastEditors: kly812 konglingyu812@163.com
 * @LastEditTime: 2024-01-15 11:32:31
 * @FilePath: /mystl/MYSTL/util.h
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
#ifndef MYSTL_UTIL_H
#define MYSTL_UTIL_H
#include <cstddef>
#include <type_traits>
namespace mystl
{

//move    
template <class T>
typename std::remove_reference<T>::type&& move(T&& arg) noexcept
{
  return static_cast<typename std::remove_reference<T>::type&&>(arg);
}

//forward
template <class T>
T&& forward(typename std::remove_reference<T>::type& arg) noexcept
{
  return static_cast<T&&>(arg);
}

template <class T>
T&& forward(typename std::remove_reference<T>::type&& arg) noexcept
{
  static_assert(!std::is_lvalue_reference<T>::value, "bad forward");
  return static_cast<T&&>(arg);
}





}



#endif // !MYSTL_UTIL_H